#include <string>
using namespace std;
class Solution
{
public:
    int init(string &s, int k)
    {
        int ret = 0;
        for (int i = 0; i < k; i++)
        {
            if ((s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u'))
                ret++;
        }
        return ret;
    }
    int maxVowels(string s, int k)
    {
        int cur = init(s, k);
        int l = 0, r = k;
        int res = cur;
        while (r < s.size())
        {
            if ((s[l] == 'a' || s[l] == 'e' || s[l] == 'i' || s[l] == 'o' || s[l] == 'u'))
                cur--;
            if ((s[r] == 'a' || s[r] == 'e' || s[r] == 'i' || s[r] == 'o' || s[r] == 'u'))
                cur++;
            ++l, ++r;
            res = max(cur, res);
        }
        return res;
    }
};